-
-
Notifications
You must be signed in to change notification settings - Fork 778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
6/Test GrantCategory #9397
6/Test GrantCategory #9397
Conversation
69bb98a
to
81f1318
Compare
0d34a3d
to
b2d2250
Compare
b2d2250
to
906ffea
Compare
* create new directory for models, copy over Contribution model * extract grants models to individual files * rename relocated_models directory, remove original models directory, add imports, resolve circular dependencies * extract CLRMatch into separate file * extract Flag into separate file * extract MatchPledge to separate file * extract Donation and PhantomFunding * extract GrantStat into separate file * refactor * extract GrantBrandingRoutingPolicy to separate file * update migration * add missing import to MatchPledge, remove imports from __init__.py * add missing import * decouple GrantCLRCalculation and move to own file * extract GrantType to own file * extract GrantCLR to own file * add missing import * refactor, add missing imports * remove whitespace * resolve circular dependency * run 'make fix' * import changes from gitcoinco#9314 * add try/except to migration file instead of editing migration directly * refactor
906ffea
to
720facf
Compare
@@ -18,6 +18,7 @@ class Contribution(SuperModel): | |||
CHECKOUT_TYPES = [ | |||
('eth_std', 'eth_std'), | |||
('eth_zksync', 'eth_zksync'), | |||
('eth_polygon', 'eth_polygon'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh this is def needed piece ! @chibie
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh shit! all my polygon backend changes in former models.py (https://github.com/gitcoinco/web/blob/5901de79753445f0c76cd406f49154186e0e80d7/app/grants/models.py) are missing from contribution.py in master!! 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chibie Oh no! I thought I had updated it with all the changes 😞
@@ -488,7 +488,7 @@ class Meta: | |||
) | |||
|
|||
in_active_clrs = models.ManyToManyField( | |||
GrantCLR, | |||
"GrantCLR", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be in ""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea... i guess it's for lazy loading to prevent circular import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that's right @chibie
@@ -488,7 +488,7 @@ class Meta: | |||
) | |||
|
|||
in_active_clrs = models.ManyToManyField( | |||
GrantCLR, | |||
"GrantCLR", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea... i guess it's for lazy loading to prevent circular import
@@ -18,6 +18,7 @@ class Contribution(SuperModel): | |||
CHECKOUT_TYPES = [ | |||
('eth_std', 'eth_std'), | |||
('eth_zksync', 'eth_zksync'), | |||
('eth_polygon', 'eth_polygon'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh shit! all my polygon backend changes in former models.py (https://github.com/gitcoinco/web/blob/5901de79753445f0c76cd406f49154186e0e80d7/app/grants/models.py) are missing from contribution.py in master!! 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's update this with changes on master after #9539 is merged in
Description
This PR adds a unit test for the GrantCategory model
Refers/Fixes
Testing